package com.szcinda.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface RateRepository extends JpaRepository<ExchangeRate, String> {
    ExchangeRate findById(String id);
    ExchangeRate findByFromRateAndToRateAndBelongIdIsNull(String from, String to);
    void deleteAllByBelongId(String belongId);
    List<ExchangeRate> findByBelongIdIsNullOrderByCreateTimeDesc();
    List<ExchangeRate> findByBelongId(String belongId);
}
